Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSF3: Fix custom render function #15668

Merged
merged 1 commit into from Jul 23, 2021
Merged

CSF3: Fix custom render function #15668

merged 1 commit into from Jul 23, 2021

Conversation

shilman
Copy link
Member

@shilman shilman commented Jul 23, 2021

Issue: N/A

What I did

storybookjs/builder-vite#76 revealed that the client-api exports are screwed up for the CSF3 global render override. This fixes them.

Self-merging @IanVS

How to test

Add this to preview.js in examples/react-ts to override the global render function:

export const render = (args, { parameters }) => {
  const Component = parameters.component;
  return (
    <div style={{ border: '3px solid' }}>
      <Component {...args} />
    </div>
  );
};

@shilman shilman added bug csf3 patch:yes Bugfix & documentation PR that need to be picked to main branch labels Jul 23, 2021
@nx-cloud
Copy link

nx-cloud bot commented Jul 23, 2021

Nx Cloud Report

CI ran the following commands for commit 28a4bc3. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch

Status Command
#000000 nx run-many --target=prepare --all --parallel --max-parallel=15

Sent with 💌 from NxCloud.

@nx-cloud
Copy link

nx-cloud bot commented Jul 23, 2021

Nx Cloud Report

We didn't find any information for the current pull request with the commit 28a4bc3.
Please make sure you set the \ NX_BRANCH\ environment variable in your CI pipeline .

Check the Getting started section to configure the app.


Sent with 💌 from NxCloud.

@shilman shilman merged commit f7ad432 into next Jul 23, 2021
@shilman shilman deleted the fix/custom-render-function branch July 23, 2021 16:49
@shilman shilman added the patch:done Patch/release PRs already cherry-picked to main/release branch label Jul 26, 2021
shilman added a commit that referenced this pull request Jul 26, 2021
@shilman shilman added this to the 6.4 PRs milestone Jul 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug csf3 patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant